package com.zimmur.app.mocolink.domain.vo;

import java.util.List;

import com.fasterxml.jackson.annotation.JsonIgnore;

public class ThemeGroupGoodsVo {
	private int pageNo = 1; // 当前页码
	private int totalRecord; // 总记录数量
	private int totalPage; // 总页数
	private Integer pageSize = 10; // 每页记录数
	private int nextPage; // 下一页
	private int prevPage; // 上一页
	private List<TopInGroupGoodsInfo> groupGoodsParamList;//返回组货信息
	private List<GroupSceneVo> sceneList;//返回多级的组货场景
	@JsonIgnore
	private int pageBeginNo; // 标记

	// 当前页码
	public int getPageNo() {
		if (pageNo < 1) {
			pageNo = 1;
		}
		return pageNo;
	}

	public void setPageNo(int pageNo) {

		this.pageNo = pageNo;
	}

	// 总记录条数
	public int getTotalRecord() {

		return totalRecord;
	}

	public void setTotalRecord(int totalRecord) {
		this.totalPage = (totalRecord % pageSize == 0 ? totalRecord / pageSize : (totalRecord / pageSize) + 1);
		this.totalRecord = totalRecord;
	}

	// 总页数
	public int getTotalPage() {
		return totalPage;
	}

	// 每页总记录条数
	public Integer getPageSize() {
		return pageSize;
	}

	public void setPageSize(Integer pageSize) {
		this.pageSize = pageSize;
	}

	// 下一页
	public int getNextPage() {
		if (pageNo >= getTotalPage()) {
			nextPage = getTotalPage();
		} else {
			nextPage = pageNo + 1;
		}
		return nextPage;
	}

	public void setNextPage(int nextPage) {
		this.nextPage = nextPage;
	}

	// 上一页
	public int getPrevPage() {
		if (getPageNo() <= 1) {
			prevPage = 1;
		} else {
			prevPage = getPageNo() - 1;
		}
		return prevPage;
	}

	public void setPrevPage(int prevPage) {
		this.prevPage = prevPage;
	}
	// 标记
	public int getPageBeginNo() {
		pageBeginNo = (getPageNo() - 1) * pageSize;
		return pageBeginNo;
	}
	public void setPageBeginNo(int pageBeginNo) {
		this.pageBeginNo = pageBeginNo;
	}
	public void setTotalPage(int totalPage) {
		this.totalPage = totalPage;
	}
	public List<TopInGroupGoodsInfo> getGroupGoodsParamList() {
		return groupGoodsParamList;
	}
	public void setGroupGoodsParamList(List<TopInGroupGoodsInfo> groupGoodsParamList) {
		this.groupGoodsParamList = groupGoodsParamList;
	}

	public List<GroupSceneVo> getSceneList() {
		return sceneList;
	}

	public void setSceneList(List<GroupSceneVo> sceneList) {
		this.sceneList = sceneList;
	}
	
}